<template>
	<!-- Header组件 -->
	<div class="header-bar">
		<HeaderNav :class1="class1 ? 'class1' : ''" />
	</div>
</template>

<script>
// import NavComp from "../navigation/index.vue";
import HeaderNav from "../headerNav/index.vue";
import axios from "axios";
export default {
	name: "HeaderComp",
	components: { HeaderNav },
	props: {
		class1: {
			type: String,
			required: true,
		},
	},
	mothods: {
		async getCategory() {
			const res = await axios({
				url: "/dev-api/home",
				methods: "GET",
			});
			console.log(res);
			this.homeList = res.data.data.header.home;
			this.biliList = res.data.data.header.bili;
			this.userList = res.data.data.header.user;
			this.remenList = res.data.data.category.right;
			this.categoryList = res.data.data.category.center;
			this.zhuanlanList = res.data.data.category.left;
		},
	},

};
</script>

<style lang="less" scoped>
.header-bar {
	width: 100%;
	background-image: url("./images/Snipaste_2022-04-17_10-37-45.png");
	background-size: cover;
	height: 155px;
}
</style>
